/*
  @author NormanMises
  @date 2023/6/12 - 17:45
*/

package com.example.demo.controller.user.account;

import com.example.demo.service.user.account.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.*;
@RestController
@ResponseBody
public class RegisterController {
    @Autowired
    private RegisterService registerService;
    @PostMapping("/user/account/register/")
    public Map<String,String> register(@RequestParam Map<String,String> map){
        String username=map.get("username");
        String password=map.get("password");
        String confirmedpassword=map.get("confirmedpassword");
        return registerService.register(username,password,confirmedpassword);
    }
}
